#ifndef _ROS_robot_msgs_ElevatorAction_h
#define _ROS_robot_msgs_ElevatorAction_h

#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"

namespace robot_msgs
{

  class ElevatorAction : public ros::Msg
  {
    public:
      typedef int32_t _action_type;
      _action_type action;
      typedef uint16_t _id_current_type;
      _id_current_type id_current;
      typedef uint16_t _id_inside_type;
      _id_inside_type id_inside;
      typedef uint16_t _id_goal_type;
      _id_goal_type id_goal;
      enum { RAISE = 1 };
      enum { LOWER = -1 };
      enum { STOP = 0 };
      enum { NO_ACTION = 1000 };

    ElevatorAction():
      action(0),
      id_current(0),
      id_inside(0),
      id_goal(0)
    {
    }

    virtual int serialize(unsigned char *outbuffer) const
    {
      int offset = 0;
      union {
        int32_t real;
        uint32_t base;
      } u_action;
      u_action.real = this->action;
      *(outbuffer + offset + 0) = (u_action.base >> (8 * 0)) & 0xFF;
      *(outbuffer + offset + 1) = (u_action.base >> (8 * 1)) & 0xFF;
      *(outbuffer + offset + 2) = (u_action.base >> (8 * 2)) & 0xFF;
      *(outbuffer + offset + 3) = (u_action.base >> (8 * 3)) & 0xFF;
      offset += sizeof(this->action);
      *(outbuffer + offset + 0) = (this->id_current >> (8 * 0)) & 0xFF;
      *(outbuffer + offset + 1) = (this->id_current >> (8 * 1)) & 0xFF;
      offset += sizeof(this->id_current);
      *(outbuffer + offset + 0) = (this->id_inside >> (8 * 0)) & 0xFF;
      *(outbuffer + offset + 1) = (this->id_inside >> (8 * 1)) & 0xFF;
      offset += sizeof(this->id_inside);
      *(outbuffer + offset + 0) = (this->id_goal >> (8 * 0)) & 0xFF;
      *(outbuffer + offset + 1) = (this->id_goal >> (8 * 1)) & 0xFF;
      offset += sizeof(this->id_goal);
      return offset;
    }

    virtual int deserialize(unsigned char *inbuffer)
    {
      int offset = 0;
      union {
        int32_t real;
        uint32_t base;
      } u_action;
      u_action.base = 0;
      u_action.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
      u_action.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
      u_action.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
      u_action.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
      this->action = u_action.real;
      offset += sizeof(this->action);
      this->id_current =  ((uint16_t) (*(inbuffer + offset)));
      this->id_current |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1);
      offset += sizeof(this->id_current);
      this->id_inside =  ((uint16_t) (*(inbuffer + offset)));
      this->id_inside |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1);
      offset += sizeof(this->id_inside);
      this->id_goal =  ((uint16_t) (*(inbuffer + offset)));
      this->id_goal |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1);
      offset += sizeof(this->id_goal);
     return offset;
    }

    const char * getType(){ return "robot_msgs/ElevatorAction"; };
    const char * getMD5(){ return "0a61b3126d7cda969c100a24133be517"; };

  };

}
#endif